home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1999 #1 / Amiga Plus 1999 #1.iso / System-Boost / Workbench / WindowToFront / Install < prev    next >
Text File  |  1998-06-17  |  7KB  |  217 lines

  1. ;** $VER: WindowToFront_install 40.1 (30.5.98) by Massimo Tantignone
  2. ;**
  3.  
  4. ;******************************
  5. ;** MESSAGES (DEFAULT: ENGLISH)
  6.  
  7. (set msg_what   "What do you want to install?")
  8. (set msg_doc    "Documentation")
  9. (set msg_seldr  "Select the destination drawer:")
  10. (set msg_whwtf  "Where do you want to copy the WindowToFront commodity?")
  11. (set msg_whdoc  "Where do you want to copy the documentation files?")
  12. (set msg_lang   "What language catalogs do you want to install?")
  13. ;(set msg_cpu000 "68000")
  14. ;(set msg_cpu020 "68020/030")
  15. ;(set msg_cpu040 "68040")
  16. ;(set msg_cpu060 "68060")
  17. (set msg_l_ita  "Italiano")
  18. (set msg_st     "Is it ok to add the following line:")
  19. (set msg_st2    "to your User-startup script?")
  20. (set whathelp   "Choose which part(s) of the WindowToFront package are to be installed.")
  21. (set dirhelp    "Select the drawer into which the WindowToFront commodity is to be copied.\nThe default is \"SYS:Tools/Commodities\".\nIf a newer version is already in place, it won't be overwritten.")
  22. (set dirhelp2   "Select the drawer into which the documentation is to be copied.")
  23. (set dirhelp2_1 "The default is the same drawer which WindowToFront resides in.")
  24. ;(set cpuhelp    "If you have an accelerated Amiga, you can choose to\ninstall a more optimized version of WindowToFront.")
  25. (set langhelp   "Choose one or more languages for WindowToFront.\nYou can later select which one to use with the Locale preferences editor.")
  26. (set sthelp     "For WindowToFront to be started at every boot, a command line must be added to your User-startup script.\nHowever, if you chose to install WindowToFront into the WBStartup drawer, such line is not needed.")
  27. (set msg_warn   "WindowToFront will be active next time you boot.\nIf you use another utility similar to WindowToFront, please remove it now.")
  28. (set msg_done   "For any question or bug report, please write to:\n\ntanti@intercom.it")
  29. (set srcdocdir  "DocsEnglish")
  30.  
  31. ;**********************
  32. ;** MESSAGES (ITALIANO)
  33.  
  34. (if (= @language "italiano")(
  35.    (set msg_what   "Cosa deve essere installato?")
  36.    (set msg_doc    "Documentazione")
  37.    (set msg_seldr  "Scegliere il cassetto di destinazione:")
  38.    (set msg_whwtf  "Dove volete che sia copiata la commodity WindowToFront?")
  39.    (set msg_whdoc  "Dove volete che siano copiati i file della documentazione?")
  40.    (set msg_lang   "Per quali lingue deve essere installato un catalog?")
  41.    ;(set msg_cpu000 "68000")
  42.    ;(set msg_cpu020 "68020/030")
  43.    ;(set msg_cpu040 "68040")
  44.    ;(set msg_cpu060 "68060")
  45.    (set msg_l_ita  "Italiano")
  46.    (set msg_st     "E` accettabile aggiungere la riga seguente:")
  47.    (set msg_st2    "al vostro script User-startup?")
  48.    (set whathelp   "Scegliere quali parti del pacchetto WindowToFront devono essere installate.")
  49.    (set dirhelp    "Selezionare il cassetto in cui deve essere copiata la commodity WindowToFront.\nIl default è \"SYS:Tools/Commodities\".\nUn'eventuale versione più recente già presente non verrà sovrascritta.")
  50.    (set dirhelp2   "Selezionare il cassetto in cui deve essere copiata la documentazione.")
  51.    (set dirhelp2_1 "Il default è lo stesso cassetto in cui si trova WindowToFront.")
  52.    ;(set cpuhelp    "Se avete un Amiga accelerato potete scegliere di\ninstallare una versione più ottimizzata di WindowToFront.")
  53.    (set langhelp   "Scegliere una o più lingue per WindowToFront.\nIn seguito si potrà scegliere quale usare con l'editor di preferenze Locale.")
  54.    (set sthelp     "Per far sì che WindowToFront parta ad ogni boot, è necessario aggiungere una riga di comando al vostro script User-startup.\nTuttavia, se WindowToFront è stato installato nel cassetto WBStartup tale riga non è necessaria.")
  55.    (set msg_warn   "WindowToFront sarà attivo a partire dal prossimo reboot.\nSe usate un'altra utility simile a WindowToFront, per favore rimuovetela ora.")
  56.    (set msg_done   "Per qualsiasi domanda o bug report, scrivete a:\n\ntanti@intercom.it")
  57.    (set srcdocdir  "DocsItaliano")
  58. ))
  59.  
  60. ;*******************************
  61. ;** ASK INSTALLATION PREFERENCES
  62.  
  63. (complete 10)
  64.  
  65. (set var_what
  66.    (askoptions
  67.       (prompt msg_what)
  68.       (help whathelp)
  69.       (choices "WindowToFront" msg_doc)
  70.       (default 3)
  71.    )
  72. )
  73.  
  74. (complete 20)
  75.  
  76. ;(set var_cpu
  77. ;   (askchoice
  78. ;      (prompt msg_selcpu)
  79. ;      (help cpuhelp)
  80. ;      (choices msg_cpu000 msg_cpu020 msg_cpu040 msg_cpu060)
  81. ;   )
  82. ;))
  83.  
  84. (complete 30)
  85.  
  86. (if (bitand var_what 1)(
  87.    (set wtfdir
  88.       (askdir
  89.          (default "SYS:Tools/Commodities")
  90.          (help dirhelp)
  91.          (prompt (cat msg_whwtf "\n\n" msg_seldr))
  92.       )
  93.    )
  94.    (set wtfdir (tackon wtfdir ""))
  95.    (set @default-dest wtfdir)
  96.    (set dirhelp2 (cat dirhelp2 "\n" dirhelp2_1))
  97. ))
  98.  
  99. (complete 40)
  100.  
  101. (if (bitand var_what 2)(
  102.    (set docdir
  103.       (askdir
  104.          (default @default-dest)
  105.          (help dirhelp2)
  106.          (prompt (cat msg_whdoc "\n\n" msg_seldr))
  107.       )
  108.    )
  109.    (set docdir (tackon docdir ""))
  110.    (if (= 0 (bitand var_what 1)) (set @default-dest docdir))
  111. ))
  112.  
  113. (if (= 0 (bitand var_what 3))
  114.    (
  115.       (set @defalt-dest "RAM:")
  116.    )
  117. )
  118.  
  119. (complete 50)
  120.  
  121. (if (bitand var_what 1)
  122.    (set var_lang
  123.       (askoptions
  124.          (prompt msg_lang)
  125.          (help langhelp)
  126.          (choices msg_l_ita)
  127.          (default 1)
  128.       )
  129.    )
  130. )
  131.  
  132. ;*******************************
  133. ;** INSTALL FILES: WINDOWTOFRONT
  134.  
  135. (complete 60)
  136.  
  137. (if (bitand var_what 1)(
  138.    (copylib
  139.          (source "WindowToFront")
  140.          (dest wtfdir)
  141.          (optional nofail)
  142.    )
  143.    (if (= 0 (exists (tackon wtfdir "WindowToFront.info")))
  144.       (copyfiles
  145.          (source "WindowToFront.info")
  146.          (dest wtfdir)
  147.       )
  148.    )
  149. ))
  150.  
  151. ;*******************************
  152. ;** INSTALL FILES: DOCUMENTATION
  153.  
  154. (complete 70)
  155.  
  156. (if (bitand var_what 2)(
  157.    (copyfiles
  158.       (source srcdocdir)
  159.       (choices "WindowToFront.doc"
  160.                "WindowToFront.guide")
  161.       (dest docdir)
  162.    )
  163.    (if (= 0 (exists (tackon docdir "WindowToFront.doc.info")))
  164.       (copyfiles
  165.          (source (tackon srcdocdir "WindowToFront.doc.info"))
  166.          (dest docdir)
  167.       )
  168.    )
  169.    (if (= 0 (exists (tackon docdir "WindowToFront.guide.info")))
  170.       (copyfiles
  171.          (source (tackon srcdocdir "WindowToFront.guide.info"))
  172.          (dest docdir)
  173.       )
  174.    )
  175. ))
  176.  
  177. ;*******************************
  178. ;** INSTALL FILES: CATALOG FILES
  179.  
  180. (complete 80)
  181.  
  182. (if (bitand var_lang 1)
  183.    (copyfiles
  184.       (source "Catalogs/italiano/windowtofront.catalog")
  185.       (dest "LOCALE:Catalogs/italiano/")
  186.    )
  187. )
  188.  
  189. ;***************
  190. ;** USER-STARTUP
  191.  
  192. (complete 90)
  193.  
  194. (if (= 0 (patmatch "WBStartup" (fileonly wtfdir)))(
  195.    (set stcommandline (cat "Run > NIL: \"" (tackon wtfdir "WindowToFront") "\""))
  196.    (startup "WindowToFront"
  197.       (prompt msg_st "\n\n" stcommandline "\n\n" msg_st2)
  198.       (help sthelp)
  199.       (command stcommandline)
  200.    )
  201. ))
  202.  
  203. ;***********
  204. ;** READ ME!
  205.  
  206. (complete 95)
  207.  
  208. (run (cat "SYS:Utilities/MultiView " (tackon srcdocdir "WindowToFront.doc")) (safe))
  209.  
  210. ;*******
  211. ;** DONE
  212.  
  213. (complete 100)
  214.  
  215. (exit (cat msg_warn "\n\n" msg_done))
  216.  
  217.